import { useState } from "react";
const useNum = (n) => {
    const [num, setNum] = useState(n);
    const increment = () => setNum(num + 1);
    const decrement = () => setNum(num - 1);

    return { num, increment, decrement }
}
export default useNum;